This relates generally to processor-based systems and, particularly, to processor-based systems that do graphics processing. In graphics processing, electronic data may be manipulated to present graphical images for display on computer displays.
Culling algorithms are used in computer graphics to avoid performing unnecessary work. For example, programmable culling eliminates the processing required for graphical elements that never actually appear in the final depiction. Graphical elements that are occluded by other elements never appear in the actual ultimate depiction, yet processing those elements may consume processing bandwidth and adversely affect performance. Objects that are not in the view frustum need not be processed. Similarly, features on surfaces that do not show in a graphical depiction do not need to be processed.
Culling shaders are generated automatically for multiple elements, such as pixels or vertices and are read once per group of primitives to decide whether to cull all of the elements of a group. For example, the decision may be made whether to cull multiple pixels at once. The culling tests are performed on groups of pixels called tiles and if a tile gets culled, then no pixel in that tile needs to be shaded or every pixel in that tile can execute a shorter and more efficient shader. To cull multiple points within a patch, the culling test is done for a conservative bound or multiple point enclosure.
Typical culling algorithms result in some overhead costs because they require extra processing. As a result, there is a performance hit from the culling algorithms, even though, net out, they result in a performance improvement, when culling actually eliminates tiles or groups of vertices.